<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>系统设置</title>
    <script src="/layui/layui.js"></script>
    <link rel="stylesheet" href="/layui/css/layui.css"/>
    <script src="/jquery/jquery-3.2.1.min.js"></script>
    <style>
        .box{
            width: 1650px;
            height: 800px;
        }
        .list{
            width: 1650px;
            height: 50px;
            margin-left: 20px;
            background-color:rgb(243,243,243);
        }
        .list-left{
            width: 150px;
            height: 30px;
            margin-top: 10px;
            float: left;
        }
        .list-left-left{
            width: 10px;
            height: 30px;
            float: left;
            background: green;
        }
        .list-left-right{
            width: 100px;
            height: 30px;
            font-size: 14px;
            line-height: 30px;
            float: left;
            text-indent: 5px;
        }
        .list-right{
            float: right;
            margin-top: 5px;
            margin-right: 35px;
        }
        .box-table{
            width: 1500px;
            height: 700px;
            margin-left: 75px;
        }
        .table-tr{
            width: 1500px;
            height: 50px;
        }
        .table-tr-td{
            width: 750px;
            height: 50px;
            line-height: 50px;
            text-align: center;
            border: 1px silver solid;
        }
    </style>
</head>
<body>
<div class="box">
    <div class="list">
        <div class="list-left">
            <div class="list-left-left"></div>
            <p class="list-left-right">管理员首页</p>
        </div>
        <div class="list-right">
            <div class="list-right-left layui-btn layui-icon layui-icon-refresh" onclick="refresh()">&nbsp;刷新</div>
        </div>
    </div>
    <table class="box-table">
        <tr class="table-tr">
            <td class="table-tr-td">Mysql版本</td>
            <td class="table-tr-td" id="MySQLVersion"></td>
        </tr>
        <tr class="table-tr">
            <td class="table-tr-td">IP地址</td>
            <td class="table-tr-td" id="serverIp"></td>
        </tr>
        <tr class="table-tr">
            <td class="table-tr-td">服务器名称</td>
            <td class="table-tr-td" id="serviceName"></td>
        </tr>
        <tr class="table-tr">
            <td class="table-tr-td">端口号</td>
            <td class="table-tr-td" id="localPort"></td>
        </tr>
        <tr class="table-tr">
            <td class="table-tr-td">操作系统</td>
            <td class="table-tr-td" id="OS_NAME"></td>
        </tr>
        <tr class="table-tr">
            <td class="table-tr-td">电脑位数</td>
            <td class="table-tr-td" id="OS_ARCH"></td>
        </tr>
        <tr class="table-tr">
            <td class="table-tr-td">浏览器名称</td>
            <td class="table-tr-td" id="browser"></td>
        </tr>
        <tr class="table-tr">
            <td class="table-tr-td">浏览器版本</td>
            <td class="table-tr-td" id="version"></td>
        </tr>
        <tr class="table-tr">
            <td class="table-tr-td">连接超时时间</td>
            <td class="table-tr-td">60000ms</td>
        </tr>
        <tr class="table-tr">
            <td class="table-tr-td">读取超时时间</td>
            <td class="table-tr-td">60000ms</td>
        </tr>
        <tr class="table-tr">
            <td class="table-tr-td">上传大小限制</td>
            <td class="table-tr-td">300MB</td>
        </tr>
    </table>
</div>
</body>
<script>
    $.ajax({
        url:"/HomePage/getMysqlEdition",
        data:{},
        type:'post',
        dataType:"json",
        success:function (data) {
            $("#MySQLVersion").text(data.data);
        }
    })
    $.ajax({
        url:"/HomePage/getNativeInformation",
        data:{},
        type:'post',
        dataType:"json",
        success:function (data) {
            console.log(data);
            $("#serviceName").text(data.data.hostName);
        }
    })
    $.ajax({
        url:"/HomePage/getPort",
        data:{},
        type:'post',
        dataType:"json",
        success:function (data) {
            console.log(data);
            $("#serverIp").text(data.data.serverIp);
            $("#localPort").text(data.data.localPort);
        }
    })
    $.ajax({
        url:"/HomePage/getWindows",
        data:{},
        type:'post',
        dataType:"json",
        success:function (data) {
            console.log(data);
            $("#OS_NAME").text(data.data.OS_NAME);
            $("#OS_ARCH").text(data.data.OS_ARCH);
        }
    })
    $.ajax({
        url:"/HomePage/getBrowserInformation",
        data:{},
        type:'post',
        dataType:"json",
        success:function (data) {
            console.log(data);
            $("#browser").text(data.data.browser);
            $("#version").text(data.data.version);

        }
    })

</script>
</html>